<template>
  <el-button @click="onClick" type="primary">{{ $t('lang.operate.download') }}</el-button>
</template>

<script lang="ts">
import { defineComponent, PropType } from 'vue'
import { exportMethod } from '@/utils/utils'

export default defineComponent({
  props: {
    updateData: {
      type: Function as PropType<(...args: any) => void>,
      required: true,
    },
  },
  setup(props) {
    function onClick() {
      exportMethod(props.updateData())
    }
    return {
      onClick,
    }
  },
})
</script>
